/*----------------------------------------------------------------------------
Owner(s): Shane Whitfield
$Copyright: $
$Id: 

Purpose  : Basic game object
----------------------------------------------------------------------------*/

#pragma once

#include "go_mobiles.h"

/*--------------------------------------------------------------------------*/
//  Class CGoHealStation declaration.
class CGoHealStation : public CGoNode
{
	typedef CGoNode super;

public:

					CGoHealStation();
					~CGoHealStation();
					
	//CGo Overrides
	virtual EClass	GetClass() {
						return EClass_HealStation;}
	
	//CGoNode Overrides
	virtual void	Update();
	
private:

	void findTargetsForHealers();
	void createHealers();

	enum EState
	{
		EState_WaitingConstruction,
		EState_WaitingHealPing,
		EState_SearchingForTargets,
		EState_AllHealersInUse,
	};
	
	void setState(EState i_state);

	bool		m_foundNewTargets;
	EState		m_state;
	float		m_tState;
	float		m_healingPing;
	float		m_healRadius;			// the radius of the healers.
	CGoHealer*	m_healers[2];			// once constructed, the healers will be created
};


/*--------------------------------------------------------------------------*/
//  Class CGoMiningStation declaration.
class CGoMiningStation : public CGoNode
{
	typedef CGoNode super;

public:

					CGoMiningStation();
					~CGoMiningStation();
					
	//CGo Overrides
	virtual EClass	GetClass() {
						return EClass_MiningStation;}
	
	//CGoNode Overrides
	virtual void	Update();
	
	CGoMinerals*	GetClosestMiningTarget();
	
private:

	enum EState
	{
		EState_WaitingConstruction,
		EState_Mining
	};
	
	void			createMiners();
	void			setState(EState i_state);

	EState		m_state;
	float		m_miningRadius;			// the radius of the healers.
	CGoMiner*	m_miners[2];			// once constructed, the healers will be created
};


/*--------------------------------------------------------------------------*/
//  Class CGoExpansionNode declaration.
class CGoExpansionNode : public CGoNode
{
	typedef CGoNode super;
	
public:

	CGoExpansionNode();
	
	//CGo Overrides
	virtual EClass	GetClass() {
						return EClass_ExpansionNode;}

private:


};


/*--------------------------------------------------------------------------*/
//  Class CGoNucleus declaration.
class CGoNucleus : public CGoNode
{
	typedef CGoNode super;
	
public:

	CGoNucleus();
	
	//CGo Overrides
	virtual EClass	GetClass() {
						return EClass_Nucleus;}
	
protected:

	virtual void onDeath();

};


/*-----------------------------------EOF!-----------------------------------*/
